from django.conf.urls.defaults import *
from django.conf import settings
from django.contrib import admin
from getdebt.main import views as main
from getdebt.wizard import views as wizard
from wizard.forms import AddDebtWizard, VidForm, VidFormWizard, FirmForm, IndividualForm, DebtFormWizard
admin.autodiscover()

urlpatterns = patterns('',
    (r'^$', main.main),
    ('^login/$', 'getdebt.profile.views.login'),
    ('^logout/$', 'getdebt.profile.views.logout'),
    ('^accounts/profile/$', 'getdebt.profile.views.profile'),
    (r'^accounts/', include('registration.urls')),
    (r'^contragent/(\w+)/(\w+)/(\w+)/$', wizard.contragent),
    (r'^debt/(\w+)/$', wizard.debt),
    (r'^contragent/(\w+)/(\w+)/$', wizard.view_contragent),
    (r'^wizard/$', AddDebtWizard([VidFormWizard, 1, VidForm, 3, DebtFormWizard])),
    (r'^adddebt/$', wizard.adddebt),
    (r'^addcontr/(\w+)/$', wizard.addcontr),
    (r'^mycontragents/(\w+)/$', wizard.mycontragents),
    (r'^mydebts/$', wizard.mydebts),
    
    ('^html/(\w+)/$', 'getdebt.main.views.html_pages'),
    (r'^admin/doc/', include('django.contrib.admindocs.urls')),
    # Uncomment the next line to enable the admin:
    (r'^admin/', include(admin.site.urls)),
    (r'^(?P<path>.*)$', 'django.views.static.serve',
          {'document_root': settings.STATIC_DOC_ROOT}),
)
